home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
rexxutil.zip
/
RXLIBDIR.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1990-10-02
|
2KB
|
70 lines
/** REXX **************************************************************/
/* */
/* Function Name: RXLIBDIR */
/* */
/* Description: Get function directory entries from a Rexx */
/* Macrospace Library. */
/* */
/* Author: W. David Ashley */
/* */
/* Version: 1.0 */
/* */
/* */
/**********************************************************************/
/* Check for correct number of input arguments */
if arg() \= 1 then do
say 'Error: Incorrect input arguments.'
say
say 'Syntax: REXTEST3 [d:[path]]filename.ext'
exit
end
if length(arg(1)) < 3 then do
say 'Error: Incorrect input arguments.'
say
say 'Syntax: REXTEST3 [d:[path]]filename.ext'
exit
end
arg file
/* Make REXXUTIL.DLL library functions available */
if rxfuncquery('RexMacroLibDir') = 1 then ,
call rxfuncadd 'RexMacroLibDir', 'REXXUTIL', 'RexMacroLibDir'
/* Read input file */
retc = RexMacroLibDir(arg(1), 'func')
if retc \= 0 then do
select
when retc = 1 then do
say 'Error: Cannot open input file' arg(1)'.'
exit
end
when retc = 2 then do
say 'Error: Out of memory or memory error.'
exit
end
when retc = 5 then do
say 'Error: Internal REXXUTIL error. Contact REXXUTIL programmer.'
exit
end
otherwise do
say 'Error: Unknown error. Contact REXXUTIL programmer.'
exit
end
end
end
/* Output each function directory entry */
if func.0 = 0 then say 'No functions found in file' arg(1)'.'
else do
say ' Size Pos Function Name'
say '-------- ------ ----------------------------------------------'
do i = 1 to func.0
say func.i
end
end
/* exit function */
call rxfuncdrop 'RexMacroLibDir'
return